package cn.iocoder.yudao.module.cockpit.dal.mysql.areatotal;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.cockpit.dal.dataobject.areatotal.AreaTotalDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.cockpit.controller.admin.areatotal.vo.*;

/**
 * 区域统计 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface AreaTotalMapper extends BaseMapperX<AreaTotalDO> {

    default PageResult<AreaTotalDO> selectPage(AreaTotalPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AreaTotalDO>()
                .likeIfPresent(AreaTotalDO::getName, reqVO.getName())
                .eqIfPresent(AreaTotalDO::getNumber, reqVO.getNumber())
                .betweenIfPresent(AreaTotalDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AreaTotalDO::getId));
    }

}